package com.zx.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * @author ZX
 * @date 2021/3/21
 */
@RestController
@RequestMapping(value = "payment")
@Slf4j
public class PaymentController
{

    @Value("${server.port}")
    String port;
    @Resource
    private DiscoveryClient discoveryClient;

    @GetMapping("/consul")
    public  String paymentConsul(){

        return "springCloud with consul"+port+"\t"+ UUID.randomUUID().toString();
    }

}
